//package com.plian.system.controller.hr.employment;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.plian.Tools.Func;
//import com.plian.Tools.StringPool;
//import com.plian.Tools.base.BaseController;
//import com.plian.Tools.pagedata.PageData;
//import com.plian.system.entity.hr.employment.AdmissionResultRecordEntity;
//import com.plian.system.model.CommonCode;
//import com.plian.system.model.ListResult;
//import com.plian.system.model.R;
//import com.plian.system.mybatis.search.SearchEntity;
//import com.plian.system.mybatis.search.SearchParamEntiy;
//import com.plian.system.mybatis.search.TokenSearch;
//import com.plian.system.mybatis.support.Condition;
//import com.plian.system.mybatis.support.Query;
//import com.plian.system.service.hr.employment.IAdmissionResultRecordService;
//import com.plian.system.vo.hr.employment.AdmissionResultRecordVO;
//import com.plian.system.wrapper.hr.employment.AdmissionResultRecordWrapper;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiOperationSupport;
//import lombok.AllArgsConstructor;
//import org.apache.commons.lang3.StringUtils;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.validation.Valid;
//import java.util.List;
//
///**
// * 录取结果备案 控制器
// *
// * @author gangan
// * @since 2023-05-23
// */
//@RestController
//@AllArgsConstructor
//@RequestMapping("api/admissionResultRecord")
//@Api(value = "录取结果备案", tags = "录取结果备案接口")
//public class AdmissionResultRecordController extends BaseController {
//
//	private final IAdmissionResultRecordService admissionResultRecordService;
//
//	private AdmissionResultRecordWrapper admissionResultRecordWrapper;
//
//	/**
//	 * 录取结果备案 详情
//	 */
//	@PostMapping("/detail")
//	@ApiOperationSupport(order = 1)
//	@ApiOperation(value = "详情", notes = "传入admissionResultRecord")
//	public R<AdmissionResultRecordVO> detail(@RequestBody AdmissionResultRecordEntity admissionResultRecord) {
//		AdmissionResultRecordEntity detail = admissionResultRecordService.getOne(Condition.getQueryWrapper(admissionResultRecord));
//		return R.data(admissionResultRecordService.getDetail(detail));
//	}
//	/**
//	 * 录取结果备案 分页
//	 */
//	@PostMapping("/list")
//	@ApiOperationSupport(order = 2)
//	@ApiOperation(value = "分页", notes = "传入admissionResultRecord")
//	public ListResult<AdmissionResultRecordVO> list(@RequestBody Query query) {
//		List<SearchEntity> entityList = query.getSearch();
//		query.setDescs("create_time");
//
//		QueryWrapper<AdmissionResultRecordEntity> queryWrapper = SearchParamEntiy.getQueryWrapper(
//				Condition.getQueryWrapper(new AdmissionResultRecordEntity()), entityList
//		);
//		TokenSearch<AdmissionResultRecordEntity> tokenSearch = new TokenSearch<>();
//		tokenSearch.addTokenNoFlowQuery(queryWrapper, query);
//
//		IPage<AdmissionResultRecordEntity> pages = admissionResultRecordService.page(Condition.getPage(query), queryWrapper);
//		ListResult<AdmissionResultRecordVO> listResult = new ListResult<>(CommonCode.SUCCESS);
//		List<AdmissionResultRecordVO> voList = admissionResultRecordWrapper.entityToVO(pages.getRecords());
//		listResult.setList(voList);
//		listResult.setTotal(Long.valueOf(pages.getTotal()).intValue());
//		return listResult;
//	}
//
//
//	/**
//	 * 录取结果备案 新增或修改
//	 */
//	@PostMapping("/submit")
//	@ApiOperationSupport(order = 6)
//	@ApiOperation(value = "新增或修改", notes = "传入admissionResultRecordVO")
//	public R submit(@Valid @RequestBody AdmissionResultRecordVO admissionResultRecordVO) {
//		return R.status(admissionResultRecordService.submit(admissionResultRecordVO));
//	}
//
//	/**
//	 * 录取结果备案 删除
//	 */
//	@PostMapping("/remove")
//	@ApiOperationSupport(order = 7)
//	@ApiOperation(value = "逻辑删除", notes = "传入ids")
//	public R remove(@RequestBody PageData pd) {
//		List<String> ids = (List<String>)pd.get("ids");
//		return R.status(admissionResultRecordService.deleteLogic(Func.toLongList(StringUtils.join(ids, StringPool.COMMA))));
//	}
//
//
//}
